package com.tpc.pictool.job;

import com.tpc.pictool.service.PDFService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class Scheduler {
    @Autowired
    private PDFService pdfService;

    public Scheduler() {
    }

    @Scheduled(
            cron = "${PDFTO}"
    )
    public void task() {
        this.pdfService.PDFToPNG();
    }
}
